const { Op } = require("sequelize");
const uploadFile = require("../model/uploadFile")

class UploadFileService {
    // 上传文件
    async uploadFile({ fileURL, fileName, uploader, uploaderId }) {
        console.log(fileURL);
        const res = await uploadFile.create({
            fileURL,
            fileName,
            uploader,
            uploaderId
        })
        return res
    }
    // 通过id
    async getFileById({ id }) {
        const res = await uploadFile.findAll({
            where: {
                id
            }
        })
        return res
    }
}

module.exports = UploadFileService;